<?
	// Curls4Girls v1.0 - 05/20/07

	class curls4girls {
		var $curl;
		var $cookiepath = "./" ;
		var $result;

		// setup the class, establish cookie path
		// should be absolute
		function curls4girls($cpath) {
			$this->cookiepath = $this->cookiepath;
		}

		// get, pass url
		function get($url) {
			$this->curl = curl_init();
			curl_setopt($this->curl, CURLOPT_URL,$url);
			curl_setopt($this->curl, CURLOPT_HTTPGET, 1); 
			curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1); 
			curl_setopt($this->curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11');
			curl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookiepath);
			curl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookiepath);
			$result = curl_exec ($this->curl);
			curl_close ($this->curl);

			return $result;
		} 

		// post, requires url to post to, and post fields
		function post($url, $fields) {
			$this->curl = curl_init();
			curl_setopt($this->curl, CURLOPT_URL,$url);
			curl_setopt($this->curl, CURLOPT_POSTFIELDS,$fields); 
			curl_setopt($this->curl, CURLOPT_POST, 1); 
			curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);
			curl_setopt($this->curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11');
			curl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookiepath);
			curl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookiepath);
			$result = curl_exec ($this->curl);
			curl_close ($this->curl);

			return $result;
		}
	}
?>